package Package.Exxample_4;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class Example_4 {
    public static void Example_4() throws IOException {
        ServerSocket ss=new ServerSocket(10086);
        Socket s=ss.accept();
        BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));
        BufferedWriter bw=new BufferedWriter(new FileWriter("D:\\insert\\javase\\Examplee_1.txt"));

        String line;
        System.out.println("ssssssssssss");
        while ((line=br.readLine())!=null) {
            bw.write(line);
            bw.newLine();
            bw.flush();
        }
        bw.close();
        ss.close();
    }
}
